package com.dpac.custom.model;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import static javax.persistence.GenerationType.IDENTITY;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;
import javax.persistence.UniqueConstraint;

import com.dpac.core.vo.BaseVo;
import com.fasterxml.jackson.annotation.JsonIgnore;

/**
 * TCustomerAccount entity. @author MyEclipse Persistence Tools
 */
@Entity
@Table(name = "t_customer_account",  uniqueConstraints = { @UniqueConstraint(columnNames = "customer_info_id"), @UniqueConstraint(columnNames = "wx_account_id") })

public class TCustomerAccount extends BaseVo implements java.io.Serializable {

	// Fields

	private Long id;
	private TCustomerInfo TCustomerInfo;
	private String account;
	private String password;
	private String useState;
	private Long wxAccountId;
	private String isDelete;
	private String createNumber;
	private String createTime;
	private String modifyNumber;
	private String modifyTime;
	private String deleteNumber;
	private String deleteTime;

	// Constructors

	/** default constructor */
	public TCustomerAccount() {}

	/** minimal constructor */
	public TCustomerAccount(String useState, String isDelete, String createTime) {
		this.useState = useState;
		this.isDelete = isDelete;
		this.createTime = createTime;
	}

	/** full constructor */
	public TCustomerAccount(TCustomerInfo TCustomerInfo, String account, String password, String useState, Long wxAccountId, String isDelete, String createNumber, String createTime,
			String modifyNumber, String modifyTime, String deleteNumber, String deleteTime) {
		this.TCustomerInfo = TCustomerInfo;
		this.account = account;
		this.password = password;
		this.useState = useState;
		this.wxAccountId = wxAccountId;
		this.isDelete = isDelete;
		this.createNumber = createNumber;
		this.createTime = createTime;
		this.modifyNumber = modifyNumber;
		this.modifyTime = modifyTime;
		this.deleteNumber = deleteNumber;
		this.deleteTime = deleteTime;
	}

	// Property accessors
	@Id
	@GeneratedValue(strategy = IDENTITY)

	@Column(name = "id", unique = true, nullable = false)

	public Long getId() {
		return this.id;
	}

	public void setId(Long id) {
		this.id = id;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "customer_info_id", unique = true)
	@JsonIgnore
	public TCustomerInfo getTCustomerInfo() {
		return this.TCustomerInfo;
	}

	public void setTCustomerInfo(TCustomerInfo TCustomerInfo) {
		this.TCustomerInfo = TCustomerInfo;
	}

	@Column(name = "account", length = 50)

	public String getAccount() {
		return this.account;
	}

	public void setAccount(String account) {
		this.account = account;
	}

	@Column(name = "password", length = 50)

	public String getPassword() {
		return this.password;
	}

	public void setPassword(String password) {
		this.password = password;
	}

	@Column(name = "use_state", nullable = false, length = 1)

	public String getUseState() {
		return this.useState;
	}

	public void setUseState(String useState) {
		this.useState = useState;
	}

	@Column(name = "wx_account_id", unique = true)

	public Long getWxAccountId() {
		return this.wxAccountId;
	}

	public void setWxAccountId(Long wxAccountId) {
		this.wxAccountId = wxAccountId;
	}

	@Column(name = "is_delete", nullable = false, length = 1)

	public String getIsDelete() {
		return this.isDelete;
	}

	public void setIsDelete(String isDelete) {
		this.isDelete = isDelete;
	}

	@Column(name = "create_number", length = 20)

	public String getCreateNumber() {
		return this.createNumber;
	}

	public void setCreateNumber(String createNumber) {
		this.createNumber = createNumber;
	}

	@Column(name = "create_time", nullable = false, length = 20)

	public String getCreateTime() {
		return this.createTime;
	}

	public void setCreateTime(String createTime) {
		this.createTime = createTime;
	}

	@Column(name = "modify_number", length = 20)

	public String getModifyNumber() {
		return this.modifyNumber;
	}

	public void setModifyNumber(String modifyNumber) {
		this.modifyNumber = modifyNumber;
	}

	@Column(name = "modify_time", length = 20)

	public String getModifyTime() {
		return this.modifyTime;
	}

	public void setModifyTime(String modifyTime) {
		this.modifyTime = modifyTime;
	}

	@Column(name = "delete_number", length = 20)

	public String getDeleteNumber() {
		return this.deleteNumber;
	}

	public void setDeleteNumber(String deleteNumber) {
		this.deleteNumber = deleteNumber;
	}

	@Column(name = "delete_time", length = 20)

	public String getDeleteTime() {
		return this.deleteTime;
	}

	public void setDeleteTime(String deleteTime) {
		this.deleteTime = deleteTime;
	}

}